package com.zmc.common.exception.base;

import com.zmc.common.enums.ErrorCodeEnum;

/**
 * @Author：zmc
 * @Date：2024/10/30 10:28
 */
public class BaseException extends RuntimeException{

    private final ErrorCodeEnum errorCodeEnum;

    public BaseException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMsg());
        this.errorCodeEnum = errorCodeEnum;
    }

    public ErrorCodeEnum getErrorCode() {
        return errorCodeEnum;
    }
}
